<?php 
$flight = $_POST['flight_id'];
//echo $flight;
$connx =mysql_connect("localhost", "root", "ubc12345") or die();
mysql_select_db("planesimple");
$data = mysql_query("SELECT * FROM seat WHERE seatStatus='reserved' AND flightid ='$flight'")
or die(mysql_error());

$res = Array();
$index = 0;
while($info = mysql_fetch_array( $data ))
{
	$res[$index] = $info['seatID'];
	$index++;

}
echo json_encode($res);
?>